package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.entity.Upload;
import com.ruoyi.system.mapper.UploadMapper;
import com.ruoyi.system.service.IUploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author GE-LV5
 * @create 2023/2/27 15:14
 */
@Service
public class UploadServicelmpl extends ServiceImpl<UploadMapper, Upload> implements IUploadService {


    @Autowired
    UploadMapper uploadMapper;


    /**
     * 查询文件上传列表
     *
     * @param upload 文件上传
     * @return
     */
    @Override
    public List<Upload> selectUploadList(Upload upload) {
        return uploadMapper.selectUploadList(upload);
    }


    /**
     * 添加文件上传
     *
     * @param upload
     * @return
     */
    @Override
    public int insertUpload(Upload upload) {
        return uploadMapper.insertUpload(upload);
    }

    /**
     * 修改文件上传
     *
     * @param upload
     * @return
     */
    @Override
    public int updateUpload(Upload upload) {
        return uploadMapper.updateUpload(upload);
    }

    /**
     * 批量删除
     *
     * @param ids
     * @return
     */
    @Override
    public int deleteUploadByIds(String ids) {
        return uploadMapper.deleteUploadByIds(Convert.toStrArray(ids));
    }

    @Override
    public Upload selectUploadById(Long id) {
        return null;
    }


}
